﻿<%@ Page Language="C#" Theme="Default" MasterPageFile="~/MasterPages/admin.master" AutoEventWireup="true"  CodeFile="NewsItem.aspx.cs" Inherits="NewsItem" Title="NewsItem List" %>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" Runat="Server">News Item List</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
		<data:GridViewSearchPanel ID="GridViewSearchPanel1" runat="server" GridViewControlID="GridView1" PersistenceMethod="Session" />
		<br />
		<data:EntityGridView ID="GridView1" runat="server"			
				AutoGenerateColumns="False"					
				OnSelectedIndexChanged="GridView1_SelectedIndexChanged"
				DataSourceID="NewsItemDataSource"
				DataKeyNames="ItemId"
				AllowMultiColumnSorting="false"
				DefaultSortColumnName="" 
				DefaultSortDirection="Ascending"	
				ExcelExportFileName="Export_NewsItem.xls"  		
			>
			<Columns>
				<asp:CommandField ShowSelectButton="True" ShowEditButton="True" />				
				<asp:BoundField DataField="LangId" HeaderText="Lang Id" SortExpression="[Lang_id]"  />
				<asp:BoundField DataField="ItemName" HeaderText="Item Name" SortExpression="[Item_Name]"  />
				<asp:BoundField DataField="ItemTitle" HeaderText="Item Title" SortExpression="[Item_Title]"  />
				<asp:BoundField DataField="ItemSummary" HeaderText="Item Summary" SortExpression="[Item_Summary]"  />
				<asp:BoundField DataField="ItemDetails" HeaderText="Item Details" SortExpression=""  />
				<asp:BoundField DataField="ItemAuthor" HeaderText="Item Author" SortExpression="[Item_Author]"  />
				<asp:BoundField DataField="ItemPostDate" DataFormatString="{0:d}" HtmlEncode="False" HeaderText="Item Post Date" SortExpression="[Item_PostDate]"  />
				<asp:BoundField DataField="ItemPostString" HeaderText="Item Post String" SortExpression="[Item_PostString]"  />
				<asp:BoundField DataField="ItemImage" HeaderText="Item Image" SortExpression="[Item_Image]"  />
				<asp:BoundField DataField="ItemImageDescription" HeaderText="Item Image Description" SortExpression="[Item_ImageDescription]"  />
				<asp:BoundField DataField="ItemKeyword" HeaderText="Item Keyword" SortExpression="[Item_Keyword]"  />
				<asp:BoundField DataField="ItemView" HeaderText="Item View" SortExpression="[Item_View]"  />
				<asp:BoundField DataField="CategoryId" HeaderText="Category Id" SortExpression="[Category_Id]"  />
				<asp:BoundField DataField="CategoryTitle" HeaderText="Category Title" SortExpression="[Category_Title]"  />
				<asp:BoundField DataField="CategoryName" HeaderText="Category Name" SortExpression="[Category_Name]"  />
				<data:BoundRadioButtonField DataField="IsHot" HeaderText="Is Hot" SortExpression="[IsHot]"  />
				<data:BoundRadioButtonField DataField="IsActive" HeaderText="Is Active" SortExpression="[IsActive]"  />
			</Columns>
			<EmptyDataTemplate>
				<b>No NewsItem Found!</b>
			</EmptyDataTemplate>
		</data:EntityGridView>
		<br />
		<asp:Button runat="server" ID="btnNewsItem" OnClientClick="javascript:location.href='NewsItemEdit.aspx'; return false;" Text="Add New"></asp:Button>
		<data:NewsItemDataSource ID="NewsItemDataSource" runat="server"
			SelectMethod="GetPaged"
			EnablePaging="True"
			EnableSorting="True"
		>
			<Parameters>
				<data:CustomParameter Name="WhereClause" Value="" ConvertEmptyStringToNull="false" />
				<data:CustomParameter Name="OrderByClause" Value="" ConvertEmptyStringToNull="false" />
				<asp:ControlParameter Name="PageIndex" ControlID="GridView1" PropertyName="PageIndex" Type="Int32" />
				<asp:ControlParameter Name="PageSize" ControlID="GridView1" PropertyName="PageSize" Type="Int32" />
				<data:CustomParameter Name="RecordCount" Value="0" Type="Int32" />
			</Parameters>
		</data:NewsItemDataSource>
	    		
</asp:Content>



